package com.cn.xcsharp.common.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * 定时任务
 */
@Component
public class TimeTask {
    @Scheduled(fixedRate = 5*60*1000)//5分钟
    public void scheduledTask() {
        System.out.println("API任务：" + LocalDateTime.now());
    }
}